package com.woniu.airent.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.airent.entity.House;
import com.woniu.airent.mapper.HouseExamineMapper;
import com.woniu.airent.service.HouseExamineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseExamineServiceImpl implements HouseExamineService {
    @Autowired
    HouseExamineMapper houseExamineMapper;
    public PageInfo<House> examineHouse(int examine, int pageNow, int pageSize){
        PageHelper.startPage(pageNow,pageSize);
        List<House> houses = houseExamineMapper.houseExamine(examine);
        return new PageInfo<>(houses);
    }

    public int yesUpdate(int hid) {
        return houseExamineMapper.yesUpdate(hid);
    }

    public int noUpdate(int hid) {
        return houseExamineMapper.noUpdate(hid);
    }
}
